#include "../source/server.hpp"
//timerwheel
//5s后不在通信，10s后关闭连接
//每次任意通信事件，都会触发任意通信函数，任意事件函数一旦触发，就会刷新定时器
int main()
{
    Socket cli_sock;
    cli_sock.CreateClient(8888,"127.0.0.1");
    const char *data = "天气挺好啊";
    int i =5;//只发送5次
    while (i--)
    {
        
        cli_sock.Send(data, strlen(data));
        char buf[1024] = {0};
        
        assert(cli_sock.Recv(buf,1023));

        DBG_LOG("%s", buf);
        sleep(1);
    }
    while(1) sleep(1);
    //cli_sock.Close();
    return 0;
}